<?php 
if ($_REQUEST['source'] == "Agents"): 
?> 
[ 
    { 
        "text": "1. Shanghai City", 
        "children": 
        [ 
            { 
                "text": "1.1 Agent-D049" 
            }, 
             { 
                "text": "1.2 Agent-D050" 
            }, 
             { 
                "text": "1.3 Agent-D051" 
            } 
        ] 
    }, 
    { 
        "text": "2. Beijing City",
		"children": 
        [ 
            { 
                "text": "2.1 Agent-D052" 
            }, 
             { 
                "text": "2.2 Agent-D053" 
            }, 
             { 
                "text": "2.3 Agent-D054" 
            } 
        ] 
    }, 
    { 
        "text": "3. Hangzhou City", 
        "children": 
        [ 
            { 
                "text": "3.1 Agent-D055" 
            }, 
             { 
                "text": "3.2 Agent-D056" 
            }, 
             { 
                "text": "3.3 Agent-D057" 
            }, 
             { 
                "text": "3.4 Agent-D058" 
            }, 
             { 
                "text": "3.5 Agent-D059" 
            }, 
             { 
                "text": "3.6 Agent-D060"
            }, 
             { 
                "text": "3.7 Agent-D061" 
            }, 
             { 
                "text": "3.8 Agent-D062" 
            }, 
             { 
                "text": "3.9 Agent-D063" 
            } 
        ] 
    } 
] 
<?php 
elseif ($_REQUEST['source'] == "Servers"): 
?> 
[ 
    { 
        "text": "1. China", 
        "children": 
        [ 
            { 
                "text": "1.1 Server-000049" 
            }, 
             { 
                "text": "1.2 Server-000050" 
            }, 
             { 
                "text": "1.3 Server-000051" 
            } 
        ] 
    }, 
    { 
        "text": "2. USA",
		"children": 
        [ 
            { 
                "text": "2.1 Server-000052" 
            }, 
             { 
                "text": "2.2 Server-000053" 
            }, 
             { 
                "text": "2.3 Server-000054" 
            } 
        ] 
    }, 
    { 
        "text": "UK", 
        "children": 
        [ 
            { 
                "text": "3.1 Server-000055" 
            }, 
             { 
                "text": "3.2 Server-000056" 
            }, 
             { 
                "text": "3.3 Server-000057" 
            }, 
             { 
                "text": "3.4 Server-000058" 
            }, 
             { 
                "text": "3.5 Server-000059" 
            }, 
             { 
                "text": "3.6 Server-000060"
            }, 
             { 
                "text": "3.7 Server-000061" 
            }, 
             { 
                "text": "3.8 Server-000062" 
            }, 
             { 
                "text": "3.9 Server-000063" 
            } 
        ] 
    } 
     
] 
<?php 
elseif ($_REQUEST['source'] == "Devices"): 
?> 
[ 
    { 
        "text": "1. Shanghai City", 
        "children": 
        [ 
            { 
                "text": "1.1 Hongqiao Hospital",
				"children":
				[
					{ 
						"text": "1.1.1 PB980-002130" 
					}, 
					 { 
						"text": "1.1.2 PB100-002131" 
					}, 
					 { 
						"text": "1.1.3 PB980-002132" 
					} 
				]
            }, 
             { 
                "text": "1.2 Pudong Hospital",
				"children":
				[
					{ 
						"text": "1.2.1 PB980-002140" 
					}, 
					 { 
						"text": "1.2.2 PB100-002141" 
					}, 
					 { 
						"text": "1.2.3 PB980-002142" 
					} 
				] 
            }, 
             { 
                "text": "1.3 Xuhui Hospital",
				"children":
				[
					{ 
						"text": "1.3.1 PB980-002150" 
					}, 
					 { 
						"text": "1.3.2 PB100-002151" 
					}, 
					 { 
						"text": "1.3.3 PB980-002152" 
					} 
				] 
            } 
        ] 
    }, 
    { 
        "text": "2. Beijing City",
		"children": 
        [ 
            { 
                "text": "2.1 Chaoyang Hospital",
				"children":
				[
					{ 
						"text": "2.1.1 PB980-990030" 
					}, 
					 { 
						"text": "2.1.2 PB100-990031" 
					}, 
					 { 
						"text": "2.1.3 PB980-990032" 
					} 
				]
            }, 
             { 
                "text": "2.2 Haidian Hospital",
				"children":
				[
					{ 
						"text": "2.2.1 PB980-990040" 
					}, 
					 { 
						"text": "2.2.2 PB100-990041" 
					}, 
					 { 
						"text": "2.2.3 PB980-990042" 
					} 
				] 
            }
        ] 
    }, 
    { 
        "text": "Hangzhou City"
	}
] 
<?php else: ?>
	{}
<?php endif; ?>